package com.qf.controller;

import com.qf.entity.Admin;
import com.qf.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class AdminController {
    @Autowired
    @Qualifier("adminService2")
    private AdminService adminService;
    @Autowired
    private Admin admin;
    @RequestMapping("/ioc")
    public String login(){
        adminService.login();
        return "ok.html";
    }
    @RequestMapping("/ioc2")
    public String show(){
        System.out.println(admin);
        return "ok.html";
    }
}
